#ifndef SOLVER3D_H
#define SOLVER3D_H

#include "Solver.h"

// --------------------------------------------------------------------------------------------------------------------
//Class Solver3D
// --------------------------------------------------------------------------------------------------------------------
class Solver3D : public Solver
{

public:
    //Creator for Solver
    Solver3D(PicParams* params_, ParallelMPI* pmpi_, Grid* grid_, PhysicalField* fields_, Diagnostic* diag_) :
        Solver(params_, pmpi_, grid_, fields_, diag_)
    {
        nx_p = params->dims_space[0]+1+2*params->oversize[0];
        nx_d = params->dims_space[0]+2+2*params->oversize[0];
        ny_p = params->dims_space[1]+1+2*params->oversize[1];
        ny_d = params->dims_space[1]+2+2*params->oversize[1];
        nz_p = params->dims_space[2]+1+2*params->oversize[2];
        nz_d = params->dims_space[2]+2+2*params->oversize[2];

        dt_ov_dx = params->dt / params->cell_length[0];
        dt_ov_dy = params->dt / params->cell_length[1];
        dt_ov_dz = params->dt / params->cell_length[2];
    };
    virtual ~Solver3D() {};

    //Overloading of () operator
    virtual void operator()(PhysicalField* fields)=0;
    virtual void operator()(ParallelMPI* pmpi, PhysicalField* fields, Diagnostic* diag)=0;
    virtual void solve_SLU(Field<double>* rho, Field<double>* phi){};
    virtual void finishSLU(){};
    virtual void initSLU_test(){};
    virtual void initSLU(){};
    virtual void solve_Exyz(Field<double>* phi, Field<double>* Ex, Field<double>* Ey, Field<double>* Ez){};

protected:
    int nx_p;
    int nx_d;
    int ny_p;
    int ny_d;
    int nz_p;
    int nz_d;
    double dt_ov_dy;
    double dt_ov_dx;
    double dt_ov_dz;

};//END class

#endif
